﻿#ifndef MANAGERCENTER_H
#define MANAGERCENTER_H

#include <QMutex>
#include <QObject>
#include <QSqlDatabase>
#include "workthread.h"
#include "clearpathDB.h"

class ManagerCenter : public QObject
{
    Q_OBJECT
public:
    explicit ManagerCenter(QObject *parent = nullptr);
    ~ManagerCenter();
    bool getIsRun() const;
    QList<ClearPath> getClearPathList();
private:
    //==============数据库===================
    ClearPathDB clearPathDB;
    //===============处理线程==================
    bool isRun;
    WorkThread *workThread;//处理线程
private:
    void initParam();

    void openWorkThread();
    void closeWorkThread();
    void startWorkThread();
    void stopWorkThread();
};

#endif // MANAGERCENTER_H
